﻿// Type: System.Windows.Forms.SRDescriptionAttribute
// Assembly: System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// Assembly location: C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll

using System.ComponentModel;

namespace System.Windows.Forms
{
    [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Parameter | AttributeTargets.Delegate | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter)]
    internal sealed class SRDescriptionAttribute : DescriptionAttribute
    {
        private bool replaced;

        public override string Description
        {
            get
            {
                if(!this.replaced)
                {
                    this.replaced = true;
                    this.DescriptionValue = System.Windows.Forms.SR.GetString(base.Description);
                }
                return base.Description;
            }
        }

        public SRDescriptionAttribute(string description)
            : base(description)
        {
        }
    }
}
